package com.example.myapplication;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

public class DownSwipeRefreshLayout extends SwipeRefreshLayout {

    private static final String TAG = "DownSwipeRefreshLayout";

    public DownSwipeRefreshLayout(@NonNull Context context) {
        super(context);
    }

    public DownSwipeRefreshLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);

    }

    // 外部拦截法

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
            if (MotionEvent.ACTION_DOWN == ev.getAction()) {
                super.onInterceptTouchEvent(ev);
                return false;
            }
        return true;
    }
}
